<?php
/**
 * Copyright © 2013-2017 Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */

// @codingStandardsIgnoreFile

/**
 * @var $block \Magento\Backend\Block\Page\System\Config\Robots\Reset
 * @var $jsonHelper \Magento\Framework\Json\Helper\Data
 */
$jsonHelper = $this->helper('Magento\Framework\Json\Helper\Data');
?>

<script>
    require([
        'prototype'
    ], function () {
        window.resetRobotsToDefault = function(){
            $('design_search_engine_robots_custom_instructions').value = <?php
                /* @escapeNotVerified */ echo $jsonHelper->jsonEncode($block->getRobotsDefaultCustomInstructions())
            ?>;
        }
    });
</script>

<?php echo $block->getButtonHtml() ?>
